<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $payName;?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="view/js/jquery.min.js"></script>
</head>
<body style="text-align:center">
	<h2><?php echo $payName;?></h2>
	<p><img src="<?php echo url('index-pay_png').'?url='.urlencode($result->qr_code);?>"></p>
	<p>扫码支付后请不要立即关闭此页面</p>
	<script>
		var query=function(){
			$.post('pay-query.htm', {number:'<?php echo $order_plat;?>'}, function(res){
				console.log(res);
				if(res.code==0){
					setTimeout('query()',3000);
				}else if(res.code>0){
					if(res.code==1) alert('支付成功！');
					else alert('支付失败！');
					if(res.message!='') window.location.href = res.message;
				}else if(res.code==-1){
					alert(res.message);
				}
			}, 'json');
		};
		query();
	</script>
</body>
</html>